<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title>Special Constraints for Dimension and Handle</title>
    <meta name="order" content="06" />
  </head>
  <body>
    <h2>Special Constraints for Dimension and Handle</h2>
    <p> Sometimes, shapes may have to be created with special features
      such as being scaled with a fixed ratio, having handles moved
      only on one direction or in a limited length. Pencil supports many
      constraints for Pencil properties. </p>
    <h3>Dimension:</h3>
<pre name="code" class="xml"><![CDATA[
<Property name="box" type="Dimension" p:lockRatio="true">36,45</Property>
]]></pre>
  <ul>
    <li>
      <strong>p:lockRatio</strong>:
      $box size is scaled with a fixed ratio. So any
      objects have width &amp; height properties is set
      &lt;Box&gt;$box&lt;/Box&gt; behavior will be scaled with a fixed
      ratio, too.
    </li>
    <li>
      <strong>p:lockW</strong>
      : the box width cannot be scaled
    </li>
    <li>
      <strong>p:lockH</strong>
      : the box height cannot be scaled.
    </li>
  </ul>
    <h3>Handle:</h3>
<pre name="code" class="xml"><![CDATA[
<Property name="width" displayName="Width" 
          type="Handle"
          p:lockY="true"
          p:minX="10"
          p:maxX="$box.w"
          p:disabled="true">100,0</Property>
]]></pre>
  <ul>
    <li>
      <strong>p:lockY</strong>
      : only move on horizontal direction
    </li>
    <li>
      <strong>p:lockX</strong>
      : only move on vertical direction
    </li>
    <li>
      <strong>p:minX, p:maxX</strong>
      : moving on horizontal direction only from mixX
      to maxX
    </li>
    <li>
      <strong>p:minY, p:maxY</strong>
      : moving on vertical direction only from mixY to
      maxY
    </li>
    <li>
      <strong>p:disabled</strong>
      : disable the handle.
    </li>
  </ul>
  </body>
</html>
